<template>
  <self-table :tableInfo="tableInfo" :cols="cols" :tableData="tableData">
    <template slot="head">
      <el-button type="primary" icon="el-icon-circle-plus-outline">添加</el-button>
      <el-button plain icon="el-icon-edit">右边按钮</el-button>
    </template>
  </self-table>
</template>

<script>
import SelfTable from "@/componets/table";
export default {
  components: {
    SelfTable,
  },
  data() {
    return {
      tableInfo: { border: true },
      cols: [
        {
          prop: "date",
          label: "日期",
          width: "220",
        },
        {
          prop: "name",
          label: "姓名",
        },
        {
          prop: "address",
          label: "地址",
        },
      ],
      tableData: [
        {
          date: "2016-05-02",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-04",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1517 弄",
        },
        {
          date: "2016-05-01",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1519 弄",
        },
        {
          date: "2016-05-03",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1516 弄",
        },
      ],
    };
  },
};
</script>
<style scoped lang="scss">
</style>